package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.system.entity.BtyMdCaiwu;
import cn.stylefeng.guns.sys.modular.system.entity.BtyMdPsfymx;
import cn.stylefeng.guns.sys.modular.system.entity.BtyMdSfc;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyMdCaiwuParam;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyMdSfcParam;
import cn.stylefeng.guns.sys.modular.system.model.result.BtyMdCaiwuResult;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.util.List;

/**
 * <p>
 * 门店财务主表 服务类
 * </p>
 *
 * @author jiangge
 * @since 2021-09-08
 */
public interface BtyMdCaiwuService extends IService<BtyMdCaiwu> {

    /**
     * 新增
     *
     * @author jiangge
     * @Date 2021-09-08
     */
    void add(BtyMdCaiwuParam param);

    /**
     * 删除
     *
     * @author jiangge
     * @Date 2021-09-08
     */
    void delete(BtyMdCaiwuParam param);

    /**
     * 更新
     *
     * @author jiangge
     * @Date 2021-09-08
     */
    void update(BtyMdCaiwuParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author jiangge
     * @Date 2021-09-08
     */
    BtyMdCaiwuResult findBySpec(BtyMdCaiwuParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author jiangge
     * @Date 2021-09-08
     */
    List<BtyMdCaiwuResult> findListBySpec(BtyMdCaiwuParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author jiangge
     * @Date 2021-09-08
     */
    LayuiPageInfo findPageBySpec(BtyMdCaiwuParam param);

    ResponseData importZcfzb(MultipartFile file) throws Exception;

    ResponseData importSyb(MultipartFile file) throws Exception;

    ResponseData importPsfymx(MultipartFile file) throws Exception;

    ResponseData importSfc(MultipartFile file) throws Exception;

    void saveSfc(List<BtyMdSfc> sfcList, List<BtyMdCaiwu> shopList, List<Long> cwIdList);

    void savePsfymx(List<BtyMdPsfymx> psfyList, List<BtyMdCaiwu> shopList, List<Long> cwIdList);

    /**
     * 导入正规损益表
     * @param file
     * @return
     */
    ResponseData importSybzg(MultipartFile file)throws Exception;

    /**
     * 异步导入收发存数据
     *
     * @param file
     * @return
     */
    Boolean addUsersAsync(MultipartFile file);
    /**
     * 异步导入收发存数据
     *
     * @param fileGetInputStream
     * @return
     */
    Boolean addUsersInputStreamAsync(InputStream fileGetInputStream);
}
